package com.lj.cms.service.impl;

import com.lj.cms.entity.Banner;
import com.lj.cms.mapper.BannerMapper;
import com.lj.cms.service.BannerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 首页banner表 服务实现类
 * </p>
 *
 * @author luojing
 * @since 2021-06-16
 */
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements BannerService {

    @Override
    @Cacheable(key = "'banner'",value = "selectAllBanner")
    public List<Banner> selectAllBanner() {
        return this.list(null);
    }
}
